package com.zzy.controller;

import com.github.pagehelper.PageInfo;
import com.zzy.model.AjaxMsg;
import com.zzy.model.Classic;
import com.zzy.model.User;
import com.zzy.service.ClassicService;
import com.zzy.service.UserService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping(value = "/classic")
public class ClassciController {

    @Resource
    private ClassicService classicService;

    @RequestMapping(value = "/all")
    @ResponseBody
    public AjaxMsg getAll() {

        return AjaxMsg.returnAjaxMsg();
    }


    @RequestMapping(value = "/test")
    public AjaxMsg fineByPage(HttpServletRequest request) {
        Classic model = new Classic();
        List<Classic> list  = classicService.getListByParam(model);
        return AjaxMsg.returnAjaxMsg(list.size(),list);
    }


}